package _thread_lock._AQS;

/**
 * @Author: huangya
 * @Date: 2020/11/02
 * @Description:
 */
public class LockTest {

    MyLock myLock = new MyLock();

    public static void main(String[] args) {
        LockTest lockTest = new LockTest();
        lockTest.a();
    }

    public void a(){
        myLock.lock();
        System.out.println("aaa");
        b();
        myLock.unlock();
    }

    public void b(){
        myLock.lock();
        System.out.println("bbb");
        myLock.unlock();
    }
}
